<?php
namespace app\api\controller;
use think\Controller;
class City extends Controller{
    private $obj;
    public function _initialize() {
        $this->obj=model("City");
    }
    
    public function getCitysByParentId(){
       $id=input("post.id");//前端ajax传来的id
       if(!$id){
           $this->error("Id不合法");
       }
       
       $citys=$this->obj->getNormalFirstCitys($id);
       if(!$citys){
           return show(0,"error");
       }
       
       return show(1,'success',$citys);
    }
    
    
}

